<?php
/**
 * Description of LoaderFactory
 *
 * @author pahhan
 */
class Model_Loader_LoaderFactory
{
    public function create(Model_ParseInfo $pi)
    {
        switch ($pi->get('class_key'))
        {
            case 'ithappens_stories':
                return new Model_Loader_IteratorLoader($pi);
            case 'bash_quotes':
                return new Model_Loader_IteratorLoader($pi);

            default:
                throw new Model_Loader_LoaderException(sprintf('Undefined key "%s"', $key));
        }
    }
}

